package swings.labels;

import change.ItemColorChange;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

/**
 * @version V1.0
 * @Title: label左侧荧光条
 * @Package
 * @Description:
 * @author: GaleBlade
 * @date:
 */
public class BarLabel extends JLabel {

    public BarLabel() throws IOException {
        BufferedImage barImg;
        barImg = ImageIO.read(new File("resources/image/bar.png"));
        this.setIcon(new ImageIcon(ItemColorChange.change(barImg)));
        this.setBounds(2,1,5,28);
    }

    public BarLabel(int x, int y) throws IOException {
        BufferedImage barImg;
        barImg = ImageIO.read(new File("resources/image/bar.png"));
        this.setIcon(new ImageIcon(ItemColorChange.change(barImg)));
        this.setBounds(x,y,5,28);
    }

}
